<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/commons/include/html_doctype.html" %>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<%@include file="/commons/page/codegen.jsp" %>
		<script type="text/javascript" src="${ctx}/js/gpoint/rdp/doorPermission/permissionTypes.js"></script>
		<title>TB_DOOR_PERMISSION_TYPES管理列表</title>
	</head>
	<body>
		<div class="wrapper wrapper-content  animated fadeInRight col-sm-12">
			<div  class="toolbar-panel ">
				<div class="toolbar-box">
					<div class="toolbar-head clearfix">
						<!-- 顶部按钮 -->
						<div class="buttons"> 		
							<a class="btn btn-primary fa fa-search" href="javascript:void(0);" ><span>搜索</span></a>
							<a class="btn btn-primary fa fa-add"   href="${ctx}/rdp/doorPermission/permissionTypes/edit.htm" ><span>添加</span></a>
					        <a class="btn btn-primary fa fa-edit"   href="javascript:void(0);"  action="${ctx}/rdp/doorPermission/permissionTypes/edit.htm" ><span>编辑</span></a>	 
					        <a class="btn btn-primary fa fa-remove" href="javascript:void(0);"  action="${ctx}/rdp/doorPermission/permissionTypes/remove.htm"><span>删除</span></a>
					        <a class="btn btn-primary fa fa-search" href="javascript:void(0);" onclick="openDialog()"><span>对应用户</span></a>
					        <a class="btn btn-primary fa fa-search" href="javascript:void(0);" onclick="openDialogdoor()"><span>对应门</span></a>
					        
						</div>
						<!-- 收缩 -->
						<div class="tools">
							<a href="javascript:void(0);" class="collapse">
								<i class="bigger-180 fa  fa-angle-double-up"></i>
							</a>
						</div>
					</div>
					<!-- #查询条件-->
					<div class="toolbar-body" >
						<form role="form" class="search-form">
							<div  class="form-inline p-xxs">
								<!--  <div class="form-group">
									<label   class="search-label">服务ID</label>:
									<input type="text"  name="Q^SERVICECODE^SL"  class="form-control"  />
								</div>  -->
								<div class="form-group">
									<label   class="search-label">权限类型名称</label>:
									<input type="text"  name="Q^PERMISSIONNAME^SL"  class="form-control"  />
								</div> 
								<!-- <div class="form-group">
									<label class="search-label">创建时间 </label>:
									<input type="text" name="Q^CREATE_TIME_^DL"  class="form-control date"  />
								</div>
								<div class="form-group">
									<label class="search-label" >至</label>:
									<input type="text" name="Q^CREATE_TIME_^DG"  class="form-control date" />
								</div>
								<div class="form-group">
									<label   class="search-label">创建人</label>:
									<input type="text"  name="Q^CREATE_BY_^SL"  class="form-control"  />
								</div> 
								<div class="form-group">
									<label class="search-label">更新时间 </label>:
									<input type="text" name="Q^UPDATE_TIME_^DL"  class="form-control date"  />
								</div>
								<div class="form-group">
									<label class="search-label" >至</label>:
									<input type="text" name="Q^UPDATE_TIME_^DG"  class="form-control date" />
								</div>
								<div class="form-group">
									<label   class="search-label">更新人</label>:
									<input type="text"  name="Q^UPDATE_BY_^SL"  class="form-control"  />
								</div> 
								<div class="form-group">
									<label   class="search-label">IP地址</label>:
									<input type="text"  name="Q^IP_^SL"  class="form-control"  />
								</div> 
								<div class="form-group">
									<label   class="search-label">扩展字段</label>:
									<input type="text"  name="Q^EXT1^SL"  class="form-control"  />
								</div> 
								<div class="form-group">
									<label   class="search-label">扩展字段</label>:
									<input type="text"  name="Q^EXT2^SL"  class="form-control"  />
								</div> 
								<div class="form-group">
									<label   class="search-label">扩展字段</label>:
									<input type="text"  name="Q^EXT3^SL"  class="form-control"  />
								</div>  -->
								<div class="form-group">
									<label   class="search-label">门总数</label>:
									<input type="text"  name="Q^DOORCOUNT^SL"  class="form-control"  />
								</div> 
								<div class="form-group">
									<label   class="search-label">用户总数</label>:
									<input type="text"  name="Q^USERCOUNT^SL"  class="form-control"  />
								</div> 
								<div class="form-group">
									<label   class="search-label">备注</label>:
									<input type="text"  name="Q^NOTE^SL"  class="form-control"  />
								</div> 
							</div>
						</form>
					</div><!--/ 查询条件-->
				</div>
			</div><!--/ 操作、查询-->
			<div class="jqGrid_wrapper">
				<table id="permissionTypesGrid" ></table>
				<div id="permissionTypesPager"></div>
			</div>
		</div>
		<script type="text/javascript">
		 function openDialogdoor(){
			  var ids = jQuery("#permissionTypesGrid").jqGrid('getGridParam','selarrrow');
		       if(ids.length != 1){
		    	   DialogUtil.confirm("请选择一个选项");
		    	   return;
		       }
		       var rowData= jQuery("#permissionTypesGrid").jqGrid("getRowData",ids[0]);
		        
			
			 //获取数值
			 console.log(rowData);
			 var  type=ids[0]; 
			    //弹框
			    DialogUtil.dialog(
					 {
			 				title : "门授权操作",
			 				content :  _ctx +'/rdp/zone/doorZone/listdoorpermission.htm?type='+type,
			 				area : [ '1000px', '820px' ],
			 				maxmin : false,
			 				end : function() {
			 					$("#permissionTypesGrid").trigger("reloadGrid");
							}
			 			
			 		}
			 ); 
			   
		   }
		
		
	 function openDialog(){
		// var rowid = jQuery("#permissionTypesGrid").jqGrid("getGridParam", "selrow");
		// var rowData = jQuery("#permissionTypesGrid").getRowData();
		
		  var ids = jQuery("#permissionTypesGrid").jqGrid('getGridParam','selarrrow');
	       if(ids.length != 1){
	    	   DialogUtil.confirm("请选择一个选项");
	    	   return;
	       }
	       var rowData= jQuery("#permissionTypesGrid").jqGrid("getRowData",ids[0]);
	        
		
		 //获取数值
		 console.log(rowData);
		
		  
		  var  type=ids[0];
		    //弹框
		    DialogUtil.dialog(
				 {
		 				title : "用户授权操作",
		 				content : _ctx +'/rdp/zone/doorZone/listuserPermission.htm?type='+type,
		 				area : [ '1000px', '820px' ],
		 				maxmin : false,
						end : function() {
							$("#permissionTypesGrid").trigger("reloadGrid");
						}
		 			
		 		}
		 ); 
		   
		    
		    
	   }
	</script>
	</body>
	
</html>